<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<script type="text/javascript" src="../../js/jquery-3.1.0.min.js"></script>
<title>Insert title here</title>
<script>
	$(document).ready(function() {
		$(":button").click(function() {
			if ($(":text:eq(0)").val().trim() == ""){
				alert("请输入正确的商品类型");
			} else {
				$("form").submit();
			}
		})
	});
</script>
</head>
<body>
	<form
		action="${empty param.id?'AddGoodsTypeServlet':'UpdateGoodsTypeServlet'}"
		method="get">
		商品类型名称： <input type="text" value="${param.gName }" name="gtypename">
		<input type="hidden" name="id" value="${param.id}"><br>
		<br> <input type="button" value="${empty param.id?'添加':'修改'}">
	</form>
</body>
</html>